import {createRouter,createWebHistory} from "vue-router"
const router = createRouter({
    history:createWebHistory(import.meta.env.BASE_URL),
    routes:[
        {
            path:'/',
            name:'LoginView',
            component:()=>import("../view/LoginView.vue")
        },
        {
            path:'/AdminLoginView',
            name:'AdminLoginView',
            component:()=>import("../view/AdminLoginView.vue")
        },
        {
            path:'/RegisterView',
            name:'RegisterView',
            component:() =>import("../view/RegisterView.vue")
        },
        {
            path:'/FrameView',
            name:'FrameView',
            component:()=>import("../view/FrameView.vue"),
            children:[
                {
                    path:'',
                    name:'Welcome',
                    component:()=>import("../view/WelcomeView.vue"),
                },
                {
                    path:'user/list',
                    name:'UserList',
                    component:()=>import("../view/users/UserListView.vue"),
                },
                {
                    path:'pay/product/list',
                    name:'ProductListView',
                    component:()=>import("../view/pay/ProductListView.vue"),
                },
                {
                    path:'pay/way/list',
                    name:'WayListView',
                    component:()=>import("../view/pay/payWayListView.vue"),
                }
            ]
        }

    ]
})
export default router;
